Resource URL: /platform/<<version=3>>/storagepool/nodepools/<NID>

    Overview: This resource applies the standard collection item pattern to
              individual OneFS storage node pools. NID in the resource path is
              either the pool name or pool ID.

     Methods: GET, PUT, DELETE

********************************************************************************

Method GET: Retrieve node pool information.

       URL: GET /platform/<<version=3>>/storagepool/nodepools/<NID>

There are no query arguments for this method.

GET response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "nodepools": {
          "minItems": 0, 
          "items": {
            "health_flags": {
              "items": {
                "enum": [
                  "underprovisioned", 
                  "missing_drives", 
                  "devices_down", 
                  "devices_smartfailed", 
                  "waiting_repair"
                ], 
                "type": "string"
              }, 
              "type": "array", 
              "description": "An array of containing any health issues with this pool.  If the pool is healthy, the list is empty."
            }, 
            "type": "object", 
            "properties": {
              "name": {
                "required": true, 
                "type": "string", 
                "description": "The node pool name."
              }, 
              "lnns": {
                "items": {
                  "type": "integer"
                }, 
                "required": true, 
                "type": "array", 
                "description": "The nodes that are part of this node pool."
              }, 
              "l3_status": {
                "enum": [
                  "l3", 
                  "storage", 
                  "migrating"
                ], 
                "type": "string", 
                "description": "'storage' if the 'l3' option is disabled. If the l3 option is enabled, 'migrating' if any SSDs in this node pool have not yet been migrated to L3. If all SSDs have been migrated, 'l3'.", 
                "required": true
              }, 
              "manual": {
                "required": true, 
                "type": "boolean", 
                "description": "Whether or not the node pool is manually managed."
              }, 
              "id": {
                "required": true, 
                "type": "integer", 
                "description": "The system ID given to the node pool."
              }, 
              "usage": {
                "required": true, 
                "type": "object", 
                "description": "Total pool usage.", 
                "properties": {
                  "used_hdd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Used bytes in the pool on HDD drives."
                  }, 
                  "avail_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Available free bytes remaining in the pool when virtual hot spare is taken into account."
                  }, 
                  "usable_ssd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool on SSD drives when virtual hot spare is taken into account."
                  }, 
                  "pct_used_hdd": {
                    "required": true, 
                    "type": "string", 
                    "description": "Percentage of usable space on HDD drives in the pool which is used."
                  }, 
                  "avail_hdd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Available free bytes remaining in the pool on HDD drives when virtual hot spare is taken into account."
                  }, 
                  "pct_used_ssd": {
                    "required": true, 
                    "type": "string", 
                    "description": "Percentage of usable space on SSD drives in the pool which is used."
                  }, 
                  "avail_ssd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Available free bytes remaining in the pool on SSD drives when virtual hot spare is taken into account."
                  }, 
                  "free_hdd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Free bytes remaining in the pool on HDD drives."
                  }, 
                  "virtual_hot_spare_bytes": {
                    "required": false, 
                    "type": "string"
                  }, 
                  "free_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Free bytes remaining in the pool."
                  }, 
                  "total_ssd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool on SSD drives."
                  }, 
                  "total_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool."
                  }, 
                  "pct_used": {
                    "required": true, 
                    "type": "string", 
                    "description": "Percentage of usable space in the pool which is used."
                  }, 
                  "balanced": {
                    "required": true, 
                    "type": "boolean", 
                    "description": "Whether or not the pool usage is currently balanced."
                  }, 
                  "used_bytes": {
                    "required": false, 
                    "type": "string", 
                    "description": "Used bytes in the pool."
                  }, 
                  "free_ssd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Free bytes remaining in the pool on SSD drives."
                  }, 
                  "usable_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool drives when virtual hot spare is taken into account."
                  }, 
                  "usable_hdd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool on HDD drives when virtual hot spare is taken into account."
                  }, 
                  "used_ssd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Used bytes in the pool on SSD drives."
                  }, 
                  "total_hdd_bytes": {
                    "required": true, 
                    "type": "string", 
                    "description": "Total bytes in the pool on HDD drives."
                  }
                }
              }, 
              "protection_policy": {
                "type": "string", 
                "description": "The underlying protection policy."
              }, 
              "l3": {
                "required": true, 
                "type": "boolean", 
                "description": "Use SSDs in this node pool for L3 cache."
              }, 
              "tier": {
                "required": true, 
                "type": [
                  "string", 
                  "integer", 
                  "null"
                ], 
                "description": "The name (if named) or system ID of the node pool's tier, if it is in a tier. Otherwise null."
              }, 
              "can_enable_l3": {
                "required": true, 
                "type": "boolean", 
                "description": "Indicates if enabling L3 is possible. L3 cannot be enabled if there are unprovisioned drives."
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }
      }
    }
  ]
}

********************************************************************************

Method PUT: Modify node pool. All input fields are optional, but one or more
            must be supplied.

       URL: PUT /platform/<<version=3>>/storagepool/nodepools/<NID>

There are no query arguments for this method.

PUT request body schema:
{
  "type": "object", 
  "properties": {
    "tier": {
      "type": [
        "string", 
        "integer", 
        "null"
      ], 
      "description": "The name or ID of the node pool's tier, if it is in a tier."
    }, 
    "protection_policy": {
      "type": "string", 
      "description": "The node pool protection policy."
    }, 
    "l3": {
      "type": "boolean", 
      "description": "Use SSDs in this node pool for L3 cache."
    }, 
    "name": {
      "type": "string", 
      "description": "The node pool name."
    }, 
    "lnns": {
      "items": {
        "type": "integer"
      }, 
      "type": "array", 
      "description": "The nodes that are part of this node pool."
    }
  }
}

There is no JSON response body for this method.

********************************************************************************

Method DELETE: Delete node pool.

          URL: DELETE /platform/<<version=3>>/storagepool/nodepools/<NID>

There are no query arguments for this method.

There is no JSON response body for this method.
